package com.neusoft.rental.service.impl;

import com.neusoft.rental.mapper.InformationMapper;
import com.neusoft.rental.po.Information;
import com.neusoft.rental.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

@Service
public class InformationServiceImpl implements InformationService {

    @Autowired
    private InformationMapper informationMapper;

    //查询所有的此用户的消息，消息是否阅读的前端根据1,0在前端处理的
    @Override
    public List<Information> queryinformation(String userid){
        return informationMapper.queryinformation(userid);
    }

    //更新用户阅读状态，通过修改数据库中的isTrue实现阅读，1代表阅读，0代表未阅读
    @Override
    public int readInformation(int id) {
        return informationMapper.readInformation(id);
    }
}
